/*
 * 文件名：FeeNoteDomain.java
 * 版权：Copyright by www.infopub.top
 * 描述：
 * 修改人：huangxiaolang
 * 修改时间：2020年1月13日
 * 跟踪单号：
 * 修改单号：
 * 修改内容：
 */

package top.infopub.mgr.fia.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;
import top.infopub.enums.fia.IncomeBillTypeEnum;
import top.infopub.enums.fia.IncomeSettlementModeEnum;

import java.math.BigDecimal;
import java.util.Date;

public class IncomeBillDomain {
    /** SGUID */
    private String id;

    /** 项目编码 */
    private String proCode;

    /** 收款归属项目 */
    private String proName;

    /** 收款类型 1=回款额 2=项目运维收入 3=政府股东借款 4=融资款 5=政府资本金 6=财务税费申请 */
    private String incomeType;

    /** 创建时间 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date addTime;

    /** 收款总额（元） */
    private BigDecimal actIncomeAmount;

    /** 实际收款金额 */
    private BigDecimal actualIncomeAmt;

    /** 结算方式  1=现金，2=支票，3=网银，4=银行承兑汇票，5=商业承兑汇票，6=银行汇票，7=总部代付工程款，8=其他 */
    private String settlementMode;

    /** 状态，0=待确认，1=确认收款 */
    private String status;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProCode() {
        return proCode;
    }

    public void setProCode(String proCode) {
        this.proCode = proCode;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public String getIncomeType() {
        return incomeType;
    }

    public void setIncomeType(String incomeType) {
        this.incomeType = incomeType;
        if (StringUtils.isNotBlank(incomeType)) {
            IncomeBillTypeEnum ppdt = IncomeBillTypeEnum.getByCode(incomeType);
            if (ppdt != null) {
                setIncomeType(ppdt.getName());
            }
        }
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public BigDecimal getActIncomeAmount() {
        return actIncomeAmount;
    }

    public void setActIncomeAmount(BigDecimal actIncomeAmount) {
        this.actIncomeAmount = actIncomeAmount;
    }

    public BigDecimal getActualIncomeAmt() {
        return actualIncomeAmt;
    }

    public void setActualIncomeAmt(BigDecimal actualIncomeAmt) {
        this.actualIncomeAmt = actualIncomeAmt;
    }

    public String getSettlementMode() {
        return settlementMode;
    }

    public void setSettlementMode(String settlementMode) {
        this.settlementMode = settlementMode;
        if (StringUtils.isNotBlank(settlementMode)) {
            IncomeSettlementModeEnum ppdt = IncomeSettlementModeEnum.getByCode(settlementMode);
            if (ppdt != null) {
                setSettlementMode(ppdt.getName());
            }
        }
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
